import request from '@/config/axios'

export interface UserVO {
  id: number
  no: string
  userNo: string
  users: number
  mobile: string
  password: string
  distributors: string
  pesence: number
  status: number
  registerIp: string
  loginIp: string
  loginDate: Date
  sex: number
  areaId: string
  birthday: Date
  height: string
  weight: string
  education: string
  marriage: string
  monthIncome: string
  nickname: string
  avatar: string
  name: string
  idNumber: string
  innerMonologue: string
  career: string
  nativePlace: string
  purchasHouse: number
  purchasCar: number
  withChild: number
  wantChild: number
  marryDate: Date
  smoker: number
  drink: number
  haveMember: number
  memberBeginTime: Date
  memberEndTime: Date
  nation: string
  constellation: string
  matchAge: string
  matchHeight: string
  matchIncome: string
  matchEducation: string
  matchMarriage: string
  matchWorkArea: string
  matchWorkAreaName: string
  matchWithChild: number
  matchWantChild: number
  matchSmoker: number
  matchDrink: number
  auditStatus: number
  auitUser: string
  auitTime: Date
  rejectReason: string
  userLevel: string
  nativePlaceName: string
  areaName: string
  age: number
  team: number
  performance: number
}

// 查询相亲会员用户列表
export const getUserPage = async (params) => {
  return await request.get({ url: `/blind/member-user/page`, params })
}

// 查询相亲会员用户详情
export const getUser = async (id: number) => {
  return await request.get({ url: `/blind/member-user/get?id=` + id })
}

// 新增相亲会员用户
export const createUser = async (data: UserVO) => {
  return await request.post({ url: `/blind/member-user/create`, data })
}

// 修改相亲会员用户
export const updateUser = async (data: UserVO) => {
  return await request.put({ url: `/blind/member-user/update`, data })
}

// 删除相亲会员用户
export const deleteUser = async (id: number) => {
  return await request.delete({ url: `/blind/member-user/delete?id=` + id })
}

// 导出相亲会员用户 Excel
export const exportUser = async (params) => {
  return await request.download({ url: `/blind/member-user/export-excel`, params })
}

// 查询分销员分页列表
export const getDistributionList = async (params) => {
  return await request.get({ url: `/member/user/getDistributionList`, params })
}

// 查询分销员详情
export const getDistributionInfo = async (id) => {
  return await request.get({ url: `/blind/member-user/getDistributionInfo?id=` + id })
}
